package experiment10;

import javafx.application.Application;
import javafx.scene.Scene;
import javafx.scene.layout.Pane;
import javafx.scene.paint.Color;
import javafx.scene.shape.Rectangle;
import javafx.stage.Stage;

public class No_1 extends Application {

    public static void main(String[] args) {
        launch(args);
    }

    @Override
    public void start(Stage primaryStage) {
        Pane pane=new Pane();
        for (int i=0;i<8;i++){
            for (int j=0;j<8;j++){


                Rectangle rectangle=new Rectangle(i*50,j*50,50,50);
                if ((i+j+2)%2==0){
                    rectangle.setFill(Color.WHITE);
                }
                else {
                    rectangle.setFill(Color.BLACK);
                }

                pane.getChildren().add(rectangle);
            }
        }

        primaryStage.setTitle("chess");
        primaryStage.setScene(new Scene(pane,400,400));
        primaryStage.show();
    }
}
